package com.cloud.poetry.base.feign;

import com.cloud.poetry.base.entity.param.QueueParam;
import com.cloud.poetry.base.feign.fallback.QueueFeignClientFallBack;
import com.cloud.poetry.core.constant.PoetryConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestPart;

/**
 * @author mengxj
 */
@FeignClient(value = "cloud-queue-server", fallbackFactory = QueueFeignClientFallBack.class)
public interface QueueFeignClient {

    @PostMapping(value = "queue/push", headers = {PoetryConstant.FEIGN_HEADER})
    void push(@RequestBody QueueParam param);
}
